Content
- Introducing R, RStudio, and Quarto
- Basic set-up and GitHub publication of a Quarto book
- ☕ BREAK
- Text editing in Markdown
- The git workflow
- ☕ BREAK
- Interactivity options (demo)
- Publishing and archiving
Workshop for Education Support colleagues at the UU library
Programming language
Pretty interface to interact with R
(and git, and Quarto)
“An open-source scientific and technical publishing system”
Turn text documents (.qmd) into html, pdf, epub, docx and more.
Today: 💻 html (documents that can be hosted on the web)
Books 📖, but also: slides, blogs, articles, websites, and more.
Quarto = more extensive version of R markdown.
Rmarkdown: make science more reproducible.
Document (.Rmd) containing both R code (R) and text (markdown).
When rendering an R markdown document, all code gets executed as well.
Same for Quarto!
But: more features + more recent than R markdown
💪 Let’s get to work!
Follow the steps here:
https://utrechtuniversity.github.io/open-textbooks/get-started.html
Create a Quarto Book project in RStudio
Render the Book to html
Turn the project folder into a git repository (more later!)
Upload (“push”) the project files to GitHub
Turn on GitHub pages to publish the html files online
For example:
Open the _quarto.yml file and change the title or authors
Change or remove some text from one of the chapters
Remember, to upload a change to GitHub:
git add yourfilewithchanges (select which files to make a snapshot of)git commit -m "Make x change" (create the snapshot with message)git push (upload to GitHub)Markdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents. - Markdown Guide
| Markdown Syntax | Output |
|---|---|
|
italics and bold |
|
superscript2 / subscript2 |
|
verbatim code |
|
First-level header |
|
Second-level header |
Here’s a named hyperlink
Clickable url: https://quarto.org/
Do the first 3 exercises of the Markdown tutorial on
https://www.markdowntutorial.com/
(italics/bold, headers, hyperlinks)
Embed an image:
See also Quarto documentation for videos
Embed a video in Quarto:
Find an image or video and embed it in one of the chapters of your book! 📖
Pull: Get latest changes from GitHub:
Make change in file on your PC
Stage: Tell git that you are planning to incorporate the file in your next snapshot:
Commit: Tell git to take the snapshot:
Push: Upload the changes to GitHub:
“What has been edited and staged?”
With the {webexercises} R package!
Install + load R package
Add to Quarto
Finished (a full version of) the book? Archive it!
Steps are outlined here with screenshots
Open textbooks for EduSupport @ UU